JSON is an open, text-based data exchange format. Reference can be made, for example, to RFC 4627. “The application/json Media Type for Javascript Object Notation (JSON), D. Crockford, JSON.org, July 2006.
JSON is a lightweight data-interchange format. JSON is easy for humans to read and write and for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition—December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an attractive data-interchange language.
JSON is built on two structures:
(A) A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
(B) An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
These are universal data structures that are supported by many modern programming languages.
The Schematron (Schematron.com) differs from other schema languages in that it not based on grammars but instead on finding tree patterns in a parsed document. This approach is said to allow many kinds of structures to be represented which are inconvenient and difficult in grammar-based schema languages. The Schematron is said to allow the development and mixing two kinds of schemas: (a) report elements that allow diagnosing which variant of a language is being processed, and (b) assert elements that allow confirmation that a document conforms to a particular schema.
The Schematron is based on certain actions:
first, find context nodes in the document (typically an element) based on XPath path criteria; and then, check to determine if some other XPath expressions are true, for each of the found context nodes.
Schematron is an example of a rule-based language that allows the specification of semantic constraints. Schematron is based on the tree pattern (XPath).
Extensible markup language (XML) schemas express shared vocabularies and enable machines to carry out human-defined rules. XML schemas provide a means for defining the structure, content and semantics of XML documents.
In a general sense an XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constraints are generally expressed using some combination of grammatical rules governing the order of elements, Boolean predicates that the content must satisfy, data types governing the content of elements and attributes, and more specialized rules such as uniqueness and referential integrity constraints.
Languages have been developed specifically to express XML schemas. The Document Type Definition (DTD) language, which is native to the XML specification, is one such type of language. Two more expressive XML schema languages are XML Schema (XSD) and RELAX.
The mechanism for associating an XML document with a schema varies according to the schema language. The association may be achieved via markup within the XML document itself, or via some external means.
An XML Path Language (XPath) expression uses a path notation, similar to those used in URLs, for addressing parts of an XML document. The expression is evaluated to yield an object of the node-set, Boolean, number, or string type. For example, the expression X/Y will return a node-set of the <Y> elements contained in the <X> elements, if such elements are declared in the source XML document.
Currently available languages for expressing XML schemas are deficient in certain respects, such as in providing an ability to employ a combination of syntactic and semantic constraints.